
merge_filetered_class3$EXPR1<-merge_filetered_class3$EXPR
m2 <-mean(merge_filetered_class3$EXPR)
s2 <-sd(merge_filetered_class3$EXPR)
merge_filetered_class3$EXPR1 <- (merge_filetered_class3$EXPR-m2)/s2
merge_filetered_class3$EXPR1[which(merge_filetered_class3$EXPR1>0)] <- 1
merge_filetered_class3$EXPR1[which(merge_filetered_class3$EXPR1<0)] <- 0
cox_check <- coxph(Surv(merge_filetered_class3$RFSTIME,event = merge_filetered_class3$RFSEVENT,type='right') ~ EXPR1, data=merge_filetered_class3)
s<-summary(cox_check)$coefficients
e_signif<-as.numeric(s["EXPR1","Pr(>|z|)"])
pdf("KMplot_class3.pdf")
survobject<-survfit(Surv(merge_filetered_class3$RFSTIME,event = merge_filetered_class3$RFSEVENT,type='right') ~ EXPR1, data=merge_filetered_class3)
plot(survobject,col=c("red","green"),ylab="percentage of survival",xlab="survival_months",frame=FALSE,main=paste("P-value ",e_signif,sep=": "),lty=2:3)
legend("topright", inset=.05,  c("EXPR<=mean","EXPR>mean"), col=c("red","green"), pch=4,lty=2:3)
dev.off()
summary(merge_filetered_class3$RFSTIME)
merge_filetered_class3[which(merge_filetered_class3$RFSTIME>199),]
